#include<stdio.h>

long eatPeach(int day)
{
    if(day == 1)
    {
        return 1;
    }
    else
    {
        return((eatPeach(day - 1) + 1) * (eatPeach(day - 1) + 1));
    }
}

int main()
{
    int n;
    scanf("%d", &n);

    printf("%ld", eatPeach(n));

    return 0;
}
